package com.mz.ozy.adapter;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.mz.ozy.R;
import com.mz.ozy.bean.TwoTitleBean;
import com.mz.ozy.utils.glideUtils.GlideUtils;

import java.util.List;

public class SortPopTwoAdapter extends BaseQuickAdapter<TwoTitleBean.MapListBean, BaseViewHolder> {

    private int selectPosition = -1;
    private String id;
    private List<TwoTitleBean.MapListBean> data;

    public SortPopTwoAdapter(@Nullable List<TwoTitleBean.MapListBean> data) {
        super(R.layout.item_brand_pop_grid_two, data);
        this.data = data;
    }

    public void setSelectPosition(int selectPosition) {
        this.selectPosition = selectPosition;
    }

    @Override
    protected void convert(BaseViewHolder helper, TwoTitleBean.MapListBean item) {
        helper.setText(R.id.brandNameTv, item.getName());
        ImageView pic = helper.getView(R.id.iv_sort_select);
        GlideUtils.loadRoundImg(mContext, pic, item.getImg(), 4);
    }

}
